package com.zlx.dao;

import com.zlx.entities.Dept;
import org.springframework.jdbc.core.BeanPropertyRowMapper;

import java.util.List;

/**
 * @Author 周罗校
 * @Description 查询部门的
 * @ClassName DeptDao
 * @date 2020.09.23 18:50:56
 * 该版权归周罗校所有，最终解释权以官方为准
 */
public class DeptDao extends BaseDao{
    public List<Dept> getAllDept(){
        String sql = "select * from dept";
        List<Dept> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(Dept.class));
        return  list;
    }
}
